﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Castle.MicroKernel.Registration;
using Castle.Windsor;
using Castle.MicroKernel.SubSystems.Configuration;
using System.IO;
using System.Reflection;
using Shape.Mvp.Views;

namespace Shape.Mvp.Ioc.Installers
{
   public class ViewInstaller : IWindsorInstaller
   {
      public void Install(IWindsorContainer container, IConfigurationStore store)
      {
         container.Register(Classes.FromAssemblyInDirectory(new AssemblyFilter(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)))
                           .BasedOn<IView>()
                           .WithServiceFromInterface()
                           .LifestyleTransient());

      }
   }
}
